/*************************************************************************
	> File Name: hzoj_641.cpp
	> Author: 
	> Mail: 
	> Created Time: Sun 18 Aug 2024 04:21:26 PM CST
 ************************************************************************/

#include<iostream>
#include <vector>
#include <set>
using namespace std;
#define MAX_N 2000
int in_deg[MAX_N + 5] = {0};
vector<vector<int>> g(MAX_N + 5); 
int ans[MAX_N + 5], cnt = 0;

int main() {
	int n, m;
	cin >> n >> m;
	for(int i = 0, a, b; i < m; i++) {
		cin >> a >> b;
		in_deg[b] += 1;
		g[a].push_back(b);
	}
	set<int> q;
	for(int i = 1; i <= n; i++) {
		if(in_deg[i] == 0) q.insert(i);
	}
	while (q.size() > 0) {
		int first = *q.begin();
		ans[cnt++] = first;
		q.erase(q.begin());
		for(int i = 0, I = g[first].size(); i < I; i++) {
			int t = g[first][i];
			in_deg[t] -= 1;
			if(in_deg[t] == 0) {
				q.insert(t);
			}
		}
	}
	for (int i = 0; i < n; i++) {
		if(i) cout << " ";
		cout << ans[i];
	}
	cout << endl;
	return 0;
}